import yagmail
def sendmail(files):  #日志和报告俩文件
    mail=yagmail.SMTP(user="1478997572@qq.com",
                      password="igsdxzioevqhjjei",
                      host="smtp.qq.com",
                      encoding="utf-8")

    mail.send(to="1478997572@qq.com",
              subject="综合服务平台新增代理商接口测试报告！",
              contents="Dear manager: \n 附件是本次测试的日志和报告文件，请查收！\n 谢谢！",
              attachments=files)